package msword;

import com4j.*;

@IID("{00020A01-0001-0000-C000-000000000046}")
public interface IApplicationEvents4 extends Com4jObject {
  // Methods:
  /**
   */

  @VTID(7)
  void startup();


  /**
   */

  @VTID(8)
  void quit();


  /**
   */

  @VTID(9)
  void documentChange();


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(10)
  void documentOpen(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(11)
  void documentBeforeClose(
          _Document doc,
          Holder<Boolean> cancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(12)
  void documentBeforePrint(
          _Document doc,
          Holder<Boolean> cancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param saveAsUI Mandatory Holder<Boolean> parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(13)
  void documentBeforeSave(
          _Document doc,
          Holder<Boolean> saveAsUI,
          Holder<Boolean> cancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(14)
  void newDocument(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param wn Mandatory msword.Window parameter.
   */

  @VTID(15)
  void windowActivate(
          _Document doc,
          Window wn);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param wn Mandatory msword.Window parameter.
   */

  @VTID(16)
  void windowDeactivate(
          _Document doc,
          Window wn);


  /**
   * @param sel Mandatory msword.Selection parameter.
   */

  @VTID(17)
  void windowSelectionChange(
          Selection sel);


  /**
   * @param sel Mandatory msword.Selection parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(18)
  void windowBeforeRightClick(
          Selection sel,
          Holder<Boolean> cancel);


  /**
   * @param sel Mandatory msword.Selection parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(19)
  void windowBeforeDoubleClick(
          Selection sel,
          Holder<Boolean> cancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(20)
  void ePostagePropertyDialog(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(21)
  void ePostageInsert(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param docResult Mandatory msword._Document parameter.
   */

  @VTID(22)
  void mailMergeAfterMerge(
          _Document doc,
          _Document docResult);


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(23)
  void mailMergeAfterRecordMerge(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param startRecord Mandatory int parameter.
   * @param endRecord Mandatory int parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(24)
  void mailMergeBeforeMerge(
          _Document doc,
          int startRecord,
          int endRecord,
          Holder<Boolean> cancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(25)
  void mailMergeBeforeRecordMerge(
          _Document doc,
          Holder<Boolean> cancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(26)
  void mailMergeDataSourceLoad(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param handled Mandatory Holder<Boolean> parameter.
   */

  @VTID(27)
  void mailMergeDataSourceValidate(
          _Document doc,
          Holder<Boolean> handled);


  /**
   * @param doc Mandatory msword._Document parameter.
   */

  @VTID(28)
  void mailMergeWizardSendToCustom(
          _Document doc);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param fromState Mandatory Holder<Integer> parameter.
   * @param toState Mandatory Holder<Integer> parameter.
   * @param handled Mandatory Holder<Boolean> parameter.
   */

  @VTID(29)
  void mailMergeWizardStateChange(
          _Document doc,
          Holder<Integer> fromState,
          Holder<Integer> toState,
          Holder<Boolean> handled);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param wn Mandatory msword.Window parameter.
   */

  @VTID(30)
  void windowSize(
          _Document doc,
          Window wn);


  /**
   * @param sel Mandatory msword.Selection parameter.
   * @param oldXMLNode Mandatory msword.XMLNode parameter.
   * @param newXMLNode Mandatory msword.XMLNode parameter.
   * @param reason Mandatory Holder<Integer> parameter.
   */

  @VTID(31)
  void xmlSelectionChange(
          Selection sel,
          XMLNode oldXMLNode,
          XMLNode newXMLNode,
          Holder<Integer> reason);


  /**
   * @param xmlNode Mandatory msword.XMLNode parameter.
   */

  @VTID(32)
  void xmlValidationError(
          XMLNode xmlNode);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param syncEventType Mandatory msword.MsoSyncEventType parameter.
   */

  @VTID(33)
  void documentSync(
          _Document doc,
          MsoSyncEventType syncEventType);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param cpDeliveryAddrStart Mandatory int parameter.
   * @param cpDeliveryAddrEnd Mandatory int parameter.
   * @param cpReturnAddrStart Mandatory int parameter.
   * @param cpReturnAddrEnd Mandatory int parameter.
   * @param xaWidth Mandatory int parameter.
   * @param yaHeight Mandatory int parameter.
   * @param bstrPrinterName Mandatory java.lang.String parameter.
   * @param bstrPaperFeed Mandatory java.lang.String parameter.
   * @param fPrint Mandatory boolean parameter.
   * @param fCancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(34)
  void ePostageInsertEx(
          _Document doc,
          int cpDeliveryAddrStart,
          int cpDeliveryAddrEnd,
          int cpReturnAddrStart,
          int cpReturnAddrEnd,
          int xaWidth,
          int yaHeight,
          String bstrPrinterName,
          String bstrPaperFeed,
          boolean fPrint,
          Holder<Boolean> fCancel);


  /**
   * @param doc Mandatory msword._Document parameter.
   * @param handled Mandatory Holder<Boolean> parameter.
   */

  @VTID(35)
  void mailMergeDataSourceValidate2(
          _Document doc,
          Holder<Boolean> handled);


  /**
   * @param pvWindow Mandatory msword.ProtectedViewWindow parameter.
   */

  @VTID(36)
  void protectedViewWindowOpen(
          msword.ProtectedViewWindow pvWindow);


  /**
   * @param pvWindow Mandatory msword.ProtectedViewWindow parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(37)
  void protectedViewWindowBeforeEdit(
          msword.ProtectedViewWindow pvWindow,
          Holder<Boolean> cancel);


  /**
   * @param pvWindow Mandatory msword.ProtectedViewWindow parameter.
   * @param closeReason Mandatory int parameter.
   * @param cancel Mandatory Holder<Boolean> parameter.
   */

  @VTID(38)
  void protectedViewWindowBeforeClose(
          msword.ProtectedViewWindow pvWindow,
          int closeReason,
          Holder<Boolean> cancel);


  /**
   * @param pvWindow Mandatory msword.ProtectedViewWindow parameter.
   */

  @VTID(39)
  void protectedViewWindowSize(
          msword.ProtectedViewWindow pvWindow);


  /**
   * @param pvWindow Mandatory msword.ProtectedViewWindow parameter.
   */

  @VTID(40)
  void protectedViewWindowActivate(
          msword.ProtectedViewWindow pvWindow);


  /**
   * @param pvWindow Mandatory msword.ProtectedViewWindow parameter.
   */

  @VTID(41)
  void protectedViewWindowDeactivate(
          msword.ProtectedViewWindow pvWindow);


  // Properties:
}
